// testDlg.h : header file
//

#if !defined(AFX_TESTDLG_H__0B453A60_AE2F_4119_AF51_CC52D47F30DF__INCLUDED_)
#define AFX_TESTDLG_H__0B453A60_AE2F_4119_AF51_CC52D47F30DF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CTestDlg dialog
#include "TestListBox.h"

class CTestDlg : public CDialog
{
	// Construction
public:
//	BOOL m_bRefreshData;
	int m_iStopDisplay;
	unsigned int m_u1msTimerCounter;
	int m_cannum;
	int m_devtype;
	DWORD m_devind;
	short m_uIaBias;
	short m_uIbBias;
	short m_BootLoaderMode;
	short m_Unlock_Button_Pressed;
	short m_Erase_Button_Pressed;
	short m_Program_Button_Pressed;
	short m_ReadFlash_Button_Pressed;
	short m_ExitBoot_Button_Pressed;
	short m_DSP_Unlocked;
	short m_File_Opened;
	short m_Flash_Erased;
	USHORT m_DSP28335_Key[8];
	CString m_string_file;
	static UINT ReceiveThread(void *param);
	void ShowInfo(CString str,int code);
	int m_connect;
	CTestDlg(CWnd* pParent = NULL);	// standard constructor
	int strtodata(unsigned char *str, unsigned char *data,int len,int flag);
	int chartoint(unsigned char chr, unsigned char *cint);
	unsigned int m_u32CAN_Rx_ID;
	unsigned int m_u32CAN_Tx_ID;
//	void  up(BOOL b){UpdateData(b);}
	// Dialog Data
	//{{AFX_DATA(CTestDlg)
	enum { IDD = IDD_TEST_DIALOG };
	CTestListBox	m_ListInfo;
	CString	m_EditSendFrmID;
	CString	m_EditReceiveFrmID;
	CString	m_EditCode;
	CString	m_EditMask;
	CString	m_EditTiming0;
	CString	m_EditTiming1;
	CString	m_strPathNameOfChoosedFile;
	CString	m_Edit_Key0;
	CString	m_Edit_Key1;
	CString	m_Edit_Key2;
	CString	m_Edit_Key3;
	CString	m_Edit_Key4;
	CString	m_Edit_Key5;
	CString	m_Edit_Key6;
	CString	m_Edit_Key7;
	//}}AFX_DATA
	
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestDlg)
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL
	
	// Implementation
protected:
	HICON m_hIcon;
	CRITICAL_SECTION m_Section;
	// Generated message map functions
	//{{AFX_MSG(CTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	virtual void OnCancel();
	virtual void OnOK();
	afx_msg void OnButtonConnect();
	afx_msg void OnButtonStartcan();
	afx_msg void OnButtonResetcan();
	afx_msg void OnMenuRefresh();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnButtonStopDisplay();
	afx_msg void OnButtonSaveDisplayData();
	afx_msg void OnButtonSend25();
	afx_msg void OnButtonUnlock();
	afx_msg void OnButtonErase();
	afx_msg void OnButtonProgram();
	afx_msg void OnButtonReadFlash();
	afx_msg void OnButtonExitBoot();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TESTDLG_H__0B453A60_AE2F_4119_AF51_CC52D47F30DF__INCLUDED_)
